import React,{Component} from 'react';
import './Card.css';
import {Icon} from "antd";

class Card extends Component{
    constructor(props){
        super(props);
        this.state={};
    }

    render() {
        const {title,count,description,icon,color1,color2}=this.props.item;
        const backgroundColor=`linear-gradient(to right,${color1},${color2})`;
        return(
            <div className={'card'} style={{background: backgroundColor}}>
                <div className={'cardLeft'}>
                    <div className={'cardTitle'}>{title}</div>
                    <div className={'cardCount'}>{count}</div>
                    <div className={'cardDescription'}>{description}</div>
                </div>
                <div className={'cardRight'}>
                    <Icon type={icon} className={'cardIcon'} />
                </div>
            </div>
        )
    }
}
export default Card;
